package com.chinasofti.properties;

import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

public class Demo04 {
    public static void main(String[] args) throws IOException {
        Properties prop = new Properties();
//        prop.getProperty("name","age");
        FileReader fr = new FileReader("java0420\\prop.properties");
        prop.load(fr);
        fr.close();
        System.out.println(prop);
        String name = prop.getProperty("name");
        System.out.println(name);
        int age = Integer.parseInt(prop.getProperty("age"));
        Student  student = new Student();
        System.out.println(age);
    }
}
